<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:odc="clr-namespace:Odyssey.Controls;assembly=Odyssey" xmlns:ctrl="clr-namespace:PasswordSafe.Controls"
        xmlns:local="clr-namespace:PasswordSafe">


    <Style TargetType="{x:Type ctrl:EditLabel}">
        <Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey odc:Skins, DefaultBorderBrush}}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Focusable" Value="True" />
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ctrl:EditLabel}">
                    <Grid Focusable="False">
                        <TextBlock Text="{TemplateBinding Text}" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="label"
                                Focusable="False" />

                        <Border Background="White" BorderBrush="{TemplateBinding BorderBrush}" Focusable="False" x:Name="outerBorder" Margin="-1"
                                BorderThickness="{TemplateBinding BorderThickness}" Visibility="Hidden">
                            <TextBox Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="0" MinHeight="12"
                                    Margin="-1" Background="Transparent" x:Name="PART_TextBox" Focusable="True" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="EditMode" Value="True">
                            <Setter Property="Visibility" Value="Visible" TargetName="outerBorder" />
                            <Setter Property="Visibility" Value="Hidden" TargetName="label" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
